#ifndef _PDF2PDF_IMPORT_H
#define _PDF2PDF_IMPORT_H

typedef void* PDF2PDFMoudleMgr;
typedef void* PDF2PDFProcessor;
typedef void* PDFWStringContent;
//typedef void* PDFParagraphContent;

#ifdef _WIN32
// On Windows system, functions are exported in a DLL
#define DLLEXPORT __declspec(dllexport)
#define STDCALL __stdcall
#else
#define DLLEXPORT
#define STDCALL
#endif // _WIN32

#ifdef __cplusplus
extern "C" {
#endif
	DLLEXPORT PDF2PDFMoudleMgr FP2P_CreateModuleMgr();
	DLLEXPORT void FP2P_DestroyModuleMgr(PDF2PDFMoudleMgr mgr);
	DLLEXPORT PDF2PDFProcessor FP2P_NewProcessor();
	DLLEXPORT void FP2P_CloseProcessor(PDF2PDFProcessor Proccessor);
	DLLEXPORT int FP2P_StartExtract(PDF2PDFProcessor Proccessor, const wchar_t* file, const char* pwd);

//	DLLEXPORT void SetDestPath(PDF2PDFProcessor prc, wchar_t* destPath);

	DLLEXPORT int FP2P_CountPage(PDF2PDFProcessor Proccessor);
	DLLEXPORT int FP2P_CountParagraph(PDF2PDFProcessor Proccessor, int iPage);
	DLLEXPORT int FP2P_IsAllLineIsIndepend(PDF2PDFProcessor Proccessor, int iPage, int iParagraph);
	DLLEXPORT int FP2P_CountIndependLineInParagraph(PDF2PDFProcessor Proccessor, int iPage, int iParagraph);
	DLLEXPORT PDFWStringContent FP2P_GetIndependLineContent(PDF2PDFProcessor Proccessor, int iPage, int iParagraph, int iLine);
	DLLEXPORT PDFWStringContent FP2P_GetParagraphContent(PDF2PDFProcessor Proccessor, int iPage, int iParagraph);
	DLLEXPORT const wchar_t* FP2P_GetContent(PDFWStringContent content, int& nLen);
	DLLEXPORT void FP2P_FreeContent(PDFWStringContent content);
	DLLEXPORT void FP2P_InitDestInfo(PDF2PDFProcessor Proccessor, int charset);
	DLLEXPORT void FP2P_AddParagraph(PDF2PDFProcessor Proccessor, int iPage, int iParagraph, const wchar_t* content);
	DLLEXPORT void FP2P_AddIndependLine(PDF2PDFProcessor Proccessor, int iPage, int iParagraph, int iLine, const wchar_t* content);
	DLLEXPORT int FP2P_SaveFile(PDF2PDFProcessor Proccessor, const wchar_t* file);
	
	
#ifdef __cplusplus
};
#endif



#endif
